<script setup lang="ts">
import { storeToRefs } from "pinia";
import { useLoginInfoStore } from "@/stores/loginInfo";
import { onLoad } from "@dcloudio/uni-app";

const { syncLoginInfo } = useLoginInfoStore();
const { LOGIN_INFO } = storeToRefs(useLoginInfoStore());

onLoad(() => {
  syncLoginInfo();
  console.log(LOGIN_INFO.value);
});
</script>

<template>
  <tm-app color="#F2F3F7">
    <tm-sheet>
      <tm-text
        :font-size="48"
        color="#000000"
        class="tw-font-bold"
        label="登录用户信息"
      >
      </tm-text>
      <tm-text
        class="tw-mb-[80rpx] tw-mt-[40rpx]"
        :font-size="28"
        color="#D68711"
        :label="LOGIN_INFO.name"
      >
      </tm-text>
    </tm-sheet>
  </tm-app>
</template>

<style scoped></style>
